.class public abstract Lcom/wqmobile/sdk/protocol/a;
.super Ljava/lang/Object;


# static fields
.field public static a:[B


# instance fields
.field public b:Lcom/wqmobile/sdk/protocol/cmd/WQTransferData;

.field public c:Ljava/util/Timer;

.field public d:I

.field public e:I

.field public f:Z

.field public g:Ljava/lang/Boolean;

.field private h:Landroid/os/Handler;

.field private i:Ljava/lang/Boolean;


# direct methods
.method static constructor <clinit>()V
    .locals 1

    const/4 v0, 0x0

    new-array v0, v0, [B

    sput-object v0, Lcom/wqmobile/sdk/protocol/a;->a:[B

    return-void
.end method

.method public constructor <init>()V
    .locals 2

    const/4 v1, 0x0

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    new-instance v0, Ljava/lang/Boolean;

    invoke-direct {v0, v1}, Ljava/lang/Boolean;-><init>(Z)V

    iput-object v0, p0, Lcom/wqmobile/sdk/protocol/a;->g:Ljava/lang/Boolean;

    new-instance v0, Lcom/wqmobile/sdk/protocol/r;

    invoke-direct {v0, p0}, Lcom/wqmobile/sdk/protocol/r;-><init>(Lcom/wqmobile/sdk/protocol/a;)V

    invoke-virtual {v0}, Lcom/wqmobile/sdk/protocol/r;->start()V

    iput v1, p0, Lcom/wqmobile/sdk/protocol/a;->e:I

    new-instance v0, Ljava/lang/Boolean;

    invoke-direct {v0, v1}, Ljava/lang/Boolean;-><init>(Z)V

    iput-object v0, p0, Lcom/wqmobile/sdk/protocol/a;->i:Ljava/lang/Boolean;

    new-instance v0, Lcom/wqmobile/sdk/protocol/cmd/WQTransferData;

    invoke-direct {v0}, Lcom/wqmobile/sdk/protocol/cmd/WQTransferData;-><init>()V

    iput-object v0, p0, Lcom/wqmobile/sdk/protocol/a;->b:Lcom/wqmobile/sdk/protocol/cmd/WQTransferData;

    const/4 v0, -0x1

    iput v0, p0, Lcom/wqmobile/sdk/protocol/a;->d:I

    const/4 v0, 0x0

    iput-object v0, p0, Lcom/wqmobile/sdk/protocol/a;->c:Ljava/util/Timer;

    iput-boolean v1, p0, Lcom/wqmobile/sdk/protocol/a;->f:Z

    return-void
.end method

.method private a(Lcom/wqmobile/sdk/protocol/cmd/a;I)V
    .locals 2

    iget-object v0, p0, Lcom/wqmobile/sdk/protocol/a;->h:Landroid/os/Handler;

    if-eqz v0, :cond_0

    new-instance v0, Lcom/wqmobile/sdk/protocol/cmd/WQTransferData;

    invoke-direct {v0}, Lcom/wqmobile/sdk/protocol/cmd/WQTransferData;-><init>()V

    iget-object v1, p0, Lcom/wqmobile/sdk/protocol/a;->b:Lcom/wqmobile/sdk/protocol/cmd/WQTransferData;

    invoke-virtual {v0, v1}, Lcom/wqmobile/sdk/protocol/cmd/WQTransferData;->b(Lcom/wqmobile/sdk/protocol/cmd/WQTransferData;)V

    invoke-virtual {v0, p1}, Lcom/wqmobile/sdk/protocol/cmd/WQTransferData;->a(Lcom/wqmobile/sdk/protocol/cmd/a;)V

    iget-object v1, p0, Lcom/wqmobile/sdk/protocol/a;->h:Landroid/os/Handler;

    invoke-virtual {v1}, Landroid/os/Handler;->obtainMessage()Landroid/os/Message;

    move-result-object v1

    invoke-virtual {v0}, Lcom/wqmobile/sdk/protocol/cmd/WQTransferData;->c()[B

    move-result-object v0

    iput-object v0, v1, Landroid/os/Message;->obj:Ljava/lang/Object;

    iput p2, v1, Landroid/os/Message;->what:I

    iget-object v0, p0, Lcom/wqmobile/sdk/protocol/a;->h:Landroid/os/Handler;

    invoke-virtual {v0, v1}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z

    :cond_0
    return-void
.end method


# virtual methods
.method public abstract a(Lcom/wqmobile/sdk/protocol/cmd/WQAckContent;)Lcom/wqmobile/sdk/protocol/cmd/a;
.end method

.method public abstract a(Lcom/wqmobile/sdk/protocol/cmd/WQCommandContent;)Lcom/wqmobile/sdk/protocol/cmd/a;
.end method

.method public abstract a(Lcom/wqmobile/sdk/protocol/cmd/WQEofContent;)Lcom/wqmobile/sdk/protocol/cmd/a;
.end method

.method public abstract a(Lcom/wqmobile/sdk/protocol/cmd/WQErrorContent;)Lcom/wqmobile/sdk/protocol/cmd/a;
.end method

.method public abstract a(Lcom/wqmobile/sdk/protocol/cmd/WQSendContent;)Lcom/wqmobile/sdk/protocol/cmd/a;
.end method

.method public final a(Landroid/os/Handler;)V
    .locals 0

    iput-object p1, p0, Lcom/wqmobile/sdk/protocol/a;->h:Landroid/os/Handler;

    return-void
.end method

.method protected final a(Lcom/wqmobile/sdk/protocol/cmd/a;)V
    .locals 1

    sget-object v0, Lcom/wqmobile/sdk/protocol/cmd/e;->b:Lcom/wqmobile/sdk/protocol/cmd/e;

    invoke-virtual {v0}, Lcom/wqmobile/sdk/protocol/cmd/e;->a()I

    move-result v0

    invoke-direct {p0, p1, v0}, Lcom/wqmobile/sdk/protocol/a;->a(Lcom/wqmobile/sdk/protocol/cmd/a;I)V

    return-void
.end method

.method public final a()Z
    .locals 1

    iget-object v0, p0, Lcom/wqmobile/sdk/protocol/a;->i:Ljava/lang/Boolean;

    invoke-virtual {v0}, Ljava/lang/Boolean;->booleanValue()Z

    move-result v0

    return v0
.end method

.method public final a([B)[B
    .locals 4

    const/4 v3, 0x0

    new-instance v1, Lcom/wqmobile/sdk/protocol/cmd/WQTransferData;

    invoke-direct {v1, p1}, Lcom/wqmobile/sdk/protocol/cmd/WQTransferData;-><init>([B)V

    iget-object v0, p0, Lcom/wqmobile/sdk/protocol/a;->b:Lcom/wqmobile/sdk/protocol/cmd/WQTransferData;

    invoke-virtual {v0, v1}, Lcom/wqmobile/sdk/protocol/cmd/WQTransferData;->c(Lcom/wqmobile/sdk/protocol/cmd/WQTransferData;)Z

    move-result v0

    if-eqz v0, :cond_2

    invoke-virtual {v1}, Lcom/wqmobile/sdk/protocol/cmd/WQTransferData;->d()I

    move-result v0

    sget-object v2, Lcom/wqmobile/sdk/protocol/cmd/d;->l:Lcom/wqmobile/sdk/protocol/cmd/d;

    invoke-virtual {v2}, Lcom/wqmobile/sdk/protocol/cmd/d;->a()I

    move-result v2

    if-ne v0, v2, :cond_0

    invoke-virtual {v1}, Lcom/wqmobile/sdk/protocol/cmd/WQTransferData;->b()Lcom/wqmobile/sdk/protocol/cmd/a;

    move-result-object v0

    check-cast v0, Lcom/wqmobile/sdk/protocol/cmd/WQErrorContent;

    invoke-virtual {v0}, Lcom/wqmobile/sdk/protocol/cmd/WQErrorContent;->a()B

    move-result v0

    const/16 v2, 0x21

    if-ne v0, v2, :cond_0

    invoke-virtual {p0}, Lcom/wqmobile/sdk/protocol/a;->e()V

    :cond_0
    invoke-virtual {v1}, Lcom/wqmobile/sdk/protocol/cmd/WQTransferData;->b()Lcom/wqmobile/sdk/protocol/cmd/a;

    move-result-object v0

    invoke-virtual {v0, p0}, Lcom/wqmobile/sdk/protocol/cmd/a;->doAction(Lcom/wqmobile/sdk/protocol/a;)Lcom/wqmobile/sdk/protocol/cmd/a;

    move-result-object v0

    if-eqz v0, :cond_1

    invoke-virtual {v1, v0}, Lcom/wqmobile/sdk/protocol/cmd/WQTransferData;->a(Lcom/wqmobile/sdk/protocol/cmd/a;)V

    invoke-virtual {v1}, Lcom/wqmobile/sdk/protocol/cmd/WQTransferData;->c()[B

    move-result-object v0

    :goto_0
    return-object v0

    :cond_1
    move-object v0, v3

    goto :goto_0

    :cond_2
    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/wqmobile/sdk/protocol/a;->f:Z

    move-object v0, v3

    goto :goto_0
.end method

.method public abstract b(Lcom/wqmobile/sdk/protocol/cmd/WQCommandContent;)Lcom/wqmobile/sdk/protocol/cmd/a;
.end method

.method public final b()V
    .locals 1

    iget-object v0, p0, Lcom/wqmobile/sdk/protocol/a;->c:Ljava/util/Timer;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/wqmobile/sdk/protocol/a;->c:Ljava/util/Timer;

    invoke-virtual {v0}, Ljava/util/Timer;->cancel()V

    const/4 v0, 0x0

    iput-object v0, p0, Lcom/wqmobile/sdk/protocol/a;->c:Ljava/util/Timer;

    :cond_0
    return-void
.end method

.method protected final b(Lcom/wqmobile/sdk/protocol/cmd/a;)V
    .locals 1

    sget-object v0, Lcom/wqmobile/sdk/protocol/cmd/e;->c:Lcom/wqmobile/sdk/protocol/cmd/e;

    invoke-virtual {v0}, Lcom/wqmobile/sdk/protocol/cmd/e;->a()I

    move-result v0

    invoke-direct {p0, p1, v0}, Lcom/wqmobile/sdk/protocol/a;->a(Lcom/wqmobile/sdk/protocol/cmd/a;I)V

    return-void
.end method

.method public final c()V
    .locals 2

    iget-object v0, p0, Lcom/wqmobile/sdk/protocol/a;->i:Ljava/lang/Boolean;

    monitor-enter v0

    const/4 v1, 0x0

    :try_start_0
    invoke-static {v1}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v1

    iput-object v1, p0, Lcom/wqmobile/sdk/protocol/a;->i:Ljava/lang/Boolean;

    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    return-void

    :catchall_0
    move-exception v1

    monitor-exit v0

    throw v1
.end method

.method public final d()V
    .locals 2

    iget-object v0, p0, Lcom/wqmobile/sdk/protocol/a;->h:Landroid/os/Handler;

    invoke-virtual {v0}, Landroid/os/Handler;->obtainMessage()Landroid/os/Message;

    move-result-object v0

    const/4 v1, 0x0

    iput-object v1, v0, Landroid/os/Message;->obj:Ljava/lang/Object;

    sget-object v1, Lcom/wqmobile/sdk/protocol/cmd/e;->d:Lcom/wqmobile/sdk/protocol/cmd/e;

    invoke-virtual {v1}, Lcom/wqmobile/sdk/protocol/cmd/e;->a()I

    move-result v1

    iput v1, v0, Landroid/os/Message;->what:I

    iget-object v1, p0, Lcom/wqmobile/sdk/protocol/a;->h:Landroid/os/Handler;

    invoke-virtual {v1, v0}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z

    return-void
.end method

.method protected e()V
    .locals 2

    iget-object v0, p0, Lcom/wqmobile/sdk/protocol/a;->b:Lcom/wqmobile/sdk/protocol/cmd/WQTransferData;

    const-string v1, ""

    invoke-virtual {v0, v1}, Lcom/wqmobile/sdk/protocol/cmd/WQTransferData;->b(Ljava/lang/String;)V

    return-void
.end method

.method public final f()V
    .locals 1

    invoke-virtual {p0}, Lcom/wqmobile/sdk/protocol/a;->g()V

    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/wqmobile/sdk/protocol/a;->f:Z

    return-void
.end method

.method public final g()V
    .locals 2

    iget-object v0, p0, Lcom/wqmobile/sdk/protocol/a;->i:Ljava/lang/Boolean;

    monitor-enter v0

    const/4 v1, 0x0

    :try_start_0
    iput v1, p0, Lcom/wqmobile/sdk/protocol/a;->e:I

    const/4 v1, 0x1

    invoke-static {v1}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v1

    iput-object v1, p0, Lcom/wqmobile/sdk/protocol/a;->i:Ljava/lang/Boolean;

    invoke-virtual {p0}, Lcom/wqmobile/sdk/protocol/a;->b()V

    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    return-void

    :catchall_0
    move-exception v1

    monitor-exit v0

    throw v1
.end method

.method public abstract h()Lcom/wqmobile/sdk/protocol/cmd/a;
.end method

.method public abstract i()Lcom/wqmobile/sdk/protocol/cmd/a;
.end method

.method public abstract j()V
.end method
